//
//  HXIflyJobRecordDetailsHeaderView.m
//  KD
//
//  Created by GaoFei on 16/7/8.
//  Copyright © 2016年 Whx. All rights reserved.
//

#import "HXIflyJobRecordDetailsHeaderView.h"

#import "HXReadDayWorkOrCommentModel.h"

@interface HXIflyJobRecordDetailsHeaderView ()

@end

@implementation HXIflyJobRecordDetailsHeaderView

-(void)awakeFromNib{

    NSLog(@"0000000000000000");
}

-(void)layoutSubviews{

    [super layoutSubviews];
    
    NSLog(@"------------");
}

-(void)setDataDic:(NSDictionary *)dataDic{

    _dataDic = dataDic;
    
    HXReadDayWorkOrCommentDetailsModel * detailModel = [_dataDic objectForKey:@"detail"];
    //姓名
    _userNameLabel.text = detailModel.Author;
    
    //时间
    //截取时间
    NSRange sendTimeRange = NSMakeRange(5, detailModel.SendDate.length - 5);
    NSString * sendTime = [detailModel.SendDate substringWithRange:sendTimeRange];
    _dateDetailsLabel.text = sendTime;
    NSRange publishRange = NSMakeRange(5,5);
    NSString * publishStr = [detailModel.SendDate substringWithRange:publishRange];
    _dateLabel.text = [NSString stringWithFormat:@"日报(%@)",publishStr];

    //传入到下面去
    _contentView.dataDic = _dataDic;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
